/**
 * Created by du on 2015/8/5.
 */

var app = angular.module("myapp", ["ngRoute"]);
app.directive('onFinishRenderFilters', function ($timeout) {
    return {
        restrict: 'A',
        link: function (scope, element, attr) {
            if (scope.$last === true) {
                $timeout(function () {
                    scope.$emit('ngRepeatFinished');
                });
                //$("input[type='checkbox'], input[type='radio']").uCheck();
            }
        }
    };
});
app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
    $routeProvider
        .when('/Home', {
            templateUrl: '/home',
            controller: 'addquerstionCtrl',
            publicAccess: true
            //resolve: {
            //    banners: function (homeService) {
            //        return homeService.getBanners(2);
            //    },
            //    ideacourses: function (homeService) {
            //        return homeService.getHomeCourses("554b1b24fbcb8d1cc0960e69|554b1b30fbcb8d1cc0960e6a|554b1b18fbcb8d1cc0960e68", 2);
            //        //return homeService.getHomeCourses("5555bf22d4f2140f90c4fd90|5555bf2cd4f2140f90c4fd91|554afc62d4f214092052dabb", 2);
            //    },
            //    diamondCourses: function (homeService) {
            //        return homeService.getDiamondCourses(4);
            //    }
            //}
        })
        .otherwise({
            redirectTo: '/Home'
        });


}]);
